import { createRouter, createWebHistory } from 'vue-router'
import type { RouteRecordRaw } from 'vue-router'

export const routerList: RouteRecordRaw[] = [
  {
    path: '/home',
    meta: {
      title: '首页'
    },
    component: () => import('../views/home/index.vue')
  },
  {
    path: '/list',
    meta: {
      title: '用户信息'
    },
    component: () => import('../views/list/index.vue')
  },
  {
    path: '/qy',
    meta: {
      title: '企业管理'
    },
    component: () => import('../views/qy/index.vue')
  },
  {
    path: '/zb',
    meta: {
      title: '直播管理'
    },
    component: () => import('../views/zb/index.vue')
  }
]
const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '/',
      name: 'layout',
      component: () => import('../views/layout/index.vue'),
      children: routerList
    },
    {
      path: '/',
      name: '号段管理',
      component: () => import('../views/login/index.vue')
    }
  ]
})

export default router
